<template name="uploadForm">
  {{#with currentUpload}}
    Uploading <b>{{file.name}}</b>:
    <span id="progress">{{progress.get}}%</span>
  {{else}}
    <input id="fileInput" type="file" />
    <p><small>Upload file in <code>jpeg</code> or <code>png</code> format, with size less or equal to 10MB</small></p>
  {{/with}}
</template>

<template name="uploadedFiles">
  {{#if uploadedFiles.count}}
    <ul>
      {{#each file in uploadedFiles.each}}
        <li>
          <img src="{{file.link}}" alt="{{file.name}}" width="50px" height="100px">
          <!-- <a href="{{file.link}}?download=true" download="{{file.name}}"></a> -->
          <a href="#" class="delete">删除</a>
        </li>
      {{/each}}
    </ul>
  {{else}}
    <div>No files uploaded, yet</div>
  {{/if}}
</template>
